<template>
      <div class="operate">
        <div class="sec">
          <input type="text" placeholder="编码" v-model="code" /><button
            class="iconfont" @click="setCode">
            &#xe634;
          </button>
        </div>
        <span class="senior" v-if="isSeniorShow">高级搜索</span>
        <el-row>
          <el-button plain v-show="isExportShow">导出</el-button>
          <el-button type="primary" v-if="isAddShow">新增</el-button>
        </el-row>
      </div>
</template>

<script>
export default {
  // data选项必须要求是一个函数，函数必须返回一个普通的对象
  data: function () {
    return {
      code:''
    };
  },
  props:{
    isAddShow:{
      type : Boolean,
      default : true
    },
    isSeniorShow:{
      type : Boolean,
      default : false
    },
    isExportShow:{
      type : Boolean,
      default : true
    },
  },
  beforeCreate(){

  },
  methods:{
    setCode(){
      this.$store.commit('common/setCode',this.code)
    }
  }
};
</script>

<style lang="scss" scoped>
@import "@/assets/css/goodsoperate.scss";
</style>
